﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks; 
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using XXX.Models.XXXEntities;

// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860

namespace XXX.api.Controllers
{
    [Route("api/account/[controller]")]
    [ApiController]
    public class UpdatePasswordController : ControllerBase
    {
        private readonly IUserRepository _invRepository;
        private readonly ILogger<UpdatePasswordController> _logger;
        public UpdatePasswordController(IUserRepository xxxRepository, ILogger<UpdatePasswordController> logger)
        {
            _invRepository = xxxRepository;
            _logger = logger;
        }

        [HttpPost]
        public Models.RetModel Post([FromBody]Models.XXXEntities.User model)
        {
            //string cc = cStr;
            //Models.XXXEntities.User model = new User();
                Models.RetModel ret = _invRepository.UpdatePassword(model);
                return ret;
           
        }


    }
}
